/*
 * Copyright (c) 2014, Asiainfo-Linkage. All rights reserved.
 * Asiainfo-Linkage PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package edu.w106.platform;

import java.io.File;

import org.apache.log4j.PropertyConfigurator;

import edu.w106.platform.mc.TrayMessage;
import edu.w106.platform.scheduler.QuartzScheduler;
import edu.w106.platform.server.JettyApplication;

/**
 * <p><b>标题：</b>Main.</p>
 *
 * <p><b>描述：</b></p>
 *
 * <p><b>版权：</b>Copyright (c) 2014 亚信联创</p>
 *
 * <p><b>工程：</b>w106-mc</p>
 *
 * @author w106
 *
 * @version 1.0.0
 *
 * @since 2014-4-30 下午4:42:17
 */
public class Main {

    public static void main(String[] args) {
        System.setProperty("config.dir", "conf");

        PropertyConfigurator.configure(new File("conf", "log4j.properties").getAbsolutePath());

        TrayMessage.getInstance();
        new JettyApplication().startApplication();

        new QuartzScheduler().start();

        /*        try {
                    Thread.sleep(1000 * 3);
                } catch (InterruptedException ex) {
                    // TODO Auto-generated catch block
                    ex.printStackTrace();
                }
                for (int i = 0; i < 8; i++) {
                    Message m = new Message();
                    m.setType(Message.MSG_ERROR);
                    m.setContent("错误:" + i);
                    msg.addMessage(m);
                }

                for (int i = 8; i < 13; i++) {
                    Message m = new Message();
                    m.setType(Message.MSG_INFO);
                    m.setContent("消息:" + i);
                    msg.addMessage(m);
                }
        */
    }
}
